'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    /**
     * Add altering commands here.
     *
     * Example:
     * await queryInterface.createTable('users', { id: Sequelize.INTEGER });
     */
     const DataTypes = Sequelize;
     await queryInterface.createTable('productattr', {
          id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
          pic_title: DataTypes.STRING(256),
          url: DataTypes.STRING(256),
          width: DataTypes.INTEGER,
          height: DataTypes.INTEGER,
          price: DataTypes.FLOAT,
          spec: DataTypes.STRING(256),
          finished_pic:  DataTypes.STRING(256),
          thumbnail_url:  DataTypes.STRING(256),
          pid:DataTypes.INTEGER,
       });
  },

  down: async (queryInterface, Sequelize) => {
    /**
     * Add reverting commands here.
     *
     * Example:
     * await queryInterface.dropTable('users');
     */
  }
};
